package _24_beiwanglu_pattern.v5_1_multiple_state;

import java.util.HashMap;

/**
 * @Description: 备忘录管理员角色
 * @Auther: 2019/6/9 0:29 by zhang.jy
 */
public class Caretaker {
    //容纳备忘录的容器
    private HashMap<String,Memento> memMap = new HashMap<String,Memento>();
    public Memento getMemento(String idx) {
        return memMap.get(idx);
    }
    public void setMemento(String idx,Memento memento) {
        this.memMap.put(idx, memento);
    }
}